const path = require("path");

const { defineConfig } = require("@vue/cli-service");

module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false, // 修改成false 就是不检查了
  outputDir: "./build",
  // eslint-disable-next-line no-dupe-keys
  transpileDependencies: true,
  publicPath: "./",
  // chainWebpack: (config) => {
  //   config.resolve.alias
  //     .set("@", path.resolve(__dirname, "src"))
  //     .set("views", "@/views")
  // }
  // 配置代理
  devServer: {
    proxy: {
      // "/api": "http://8.130.32.196:1452",
      // changeOrigin: true
      "/api": {
        target: "http://8.130.32.196:1452",
        ws: false,
        changeOrigin: true,
        pathRewrite: {
          //重写路径
          "^/api": "" //代理路径
        }
      }
    }
  },
  configureWebpack: {
    resolve: {
      alias: {
        components: "@/components"
      }
    }
  }
});
